<template>
  <div>
    <div class="recommendTitle">周末去哪</div>
    <ul>
      <li class="item" v-for="item in list" :key="item.id">
        <div class="item-img">
          <img :src="item.imgUrl" alt>
        </div>
        <div class="item-info">
          <p class="item-title">{{item.title}}</p>
          <p class="item-desc">{{item.desc}}</p>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: "homeWeekend",
  props:{
      list:Array
  }
};
</script>

<style lang="less" scoped>
@import "~@/assets/styles/common.less";
.recommendTitle {
  margin-top: 0.2rem;
  line-height: 0.8rem;
  background-color: #eee;
  text-indent: 0.2rem;
}
.item-img {
  
  overflow: hidden;
  height: 0;
  padding-bottom: 38%;

  img {
    width: 100%;
  }
}
.item-info {
  
  padding: 0.1rem;
  // 添加此属性才可以使单行溢出显示省略号
  min-width: 0;
  .item-title {
    font-size: 0.4rem;
    margin: 0.2rem 0;
    .oneLine();
  }
  .item-desc {
    margin: 0.2rem 0;
    .oneLine();
  }
  
}
</style>
